// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.ast;

import static codej.ast.Option.*;
import codej.ast.*;
import codej.ast.*;

/** @author Luca Marrocco */
public class Switch extends Statement {

	private Expression expression;

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public void add(SwitchCase switchCase) {
		addChild(switchCase);
	}

	public void setExpression(Expression expression) {
		this.expression = expression;
	}

	public Expression getExpression() {
		return option(expression, new Expression());
	}

}
